The present invention relates to a new process for the preparation of water-soluble, self-crosslinkable, storage-stable polycondensates having a low organic chlorine content and a low dichloropropanol, chloropropanediol and epichlorohydrin content by reaction of polyamidoamines and, if appropriate, polyamines with epichlorohydrin, the unreacted epichlorohydrin being removed with an inert gas, and to the use of the polycondensates as auxiliaries in papermaking or for after-treatment of textiles.